from content.models import Content


def categories(request):

    """ Добавляем названия категоий в контекст """

    categories = []
    list_of_contents = Content.__subclasses__()

    for category in list_of_contents:
        category = {'model_name': category._meta.model_name,
                    'category_name': category._meta.verbose_name_plural}

        categories.append(category)

    return {'categories': categories}
